package net.greyar.theory;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;


public class Loader {

	public static String pattern(String name) throws IOException {
        File file = new File(Loader.class.getClassLoader().getResource(name + ".ptt").getPath());
		BufferedReader reader = new BufferedReader(new FileReader(file));
		StringBuilder pat = new StringBuilder("");
		int c = reader.read();
		while (c != -1) {
			pat.append((char) c);
			c = reader.read();
		}
		reader.close();
		return pat.toString();
	}
}
